package com.hdwx.weike.controllers;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by hdwx on 2017/1/9.
 */
@WebServlet(urlPatterns = "/code.do")
public class CodeController extends BaseController {
    @Override
    public void todo(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int a=(int)(Math.random()*10);
        int b=(int)(Math.random()*10);
        int c=(int)(Math.random()*10);
        int d=(int)(Math.random()*10);
        String num=""+a+b+c+d;
        resp.getWriter().print(num);
    }
}
